package character;

public class WowCharacterTalents extends WowCharacter {
	
	private Integer firstTree;
	private Integer secondTree;
	private Integer thirdTree;
	
	private String primaryTalentSpeccFromWow;
	

	public Enum<?> getTalentSpeccForGivenCharacter(ClassType classType) {
		ClassOperationType classOpType = null;
		if(classType.equals(ClassType.Warrior)) {
			if((firstTree > thirdTree) && (secondTree > thirdTree) 
					&& ((secondTree + firstTree) > thirdTree)) {
				classOpType = ClassOperationType.MELEE;
			} else {
				//talent tree phase 3 meens 
				classOpType = ClassOperationType.TANK;
			}
		} else if(classType.equals(ClassType.Paladin)) {
			if(firstTree > secondTree && firstTree > thirdTree &&
					firstTree > (secondTree + thirdTree)) {
				classOpType = ClassOperationType.RANGED; //TODO: Should be Healer
			} else if (secondTree > firstTree && secondTree > thirdTree &&
					secondTree > (firstTree + thirdTree)) {
				classOpType = ClassOperationType.TANK;
			} else {
				classOpType = ClassOperationType.MELEE;
			}
		} else if(classType.equals(ClassType.Shaman)) {
			if(firstTree > secondTree && firstTree > thirdTree && 
					firstTree > (secondTree + thirdTree)) {
				classOpType = ClassOperationType.RANGED;
			} else if (secondTree > firstTree && secondTree > thirdTree && 
					secondTree > (firstTree + thirdTree)) {
				classOpType = ClassOperationType.MELEE;
			} else {
				classOpType = ClassOperationType.RANGED; //TODO: Should be Healer
			}
		} else if(classType.equals(ClassType.Druid)) {
			if(firstTree > secondTree && firstTree > thirdTree && 
					firstTree > (secondTree + thirdTree)) {
				classOpType = ClassOperationType.RANGED;
			} else if (secondTree > firstTree && secondTree > thirdTree && 
					secondTree > (firstTree + thirdTree)) {
				//TODO: Undef if MELEE OR TANK..!!!
				classOpType = ClassOperationType.MELEE;
			} else {
				classOpType = ClassOperationType.RANGED; //TODO: Should be Healer
			}
		} else if (classType.equals(ClassType.DeathKnight)){
			//DEATHKNIGT!!
			classOpType = ClassOperationType.UNDEFINED;
		}
		return classOpType;
	}
	
	public String getPrimaryTalentSpeccFromWow() {
		return primaryTalentSpeccFromWow;
	}
	public void setPrimaryTalentSpeccFromWow(String primaryTalentSpeccFromWow) {
		this.primaryTalentSpeccFromWow = primaryTalentSpeccFromWow;
	}
	public Integer getFirstTree() {
		return firstTree;
	}
	public void setFirstTree(Integer firstTree) {
		this.firstTree = firstTree;
	}
	public Integer getSecondTree() {
		return secondTree;
	}
	public void setSecondTree(Integer secondTree) {
		this.secondTree = secondTree;
	}
	public Integer getThirdTree() {
		return thirdTree;
	}
	public void setThirdTree(Integer thirdTree) {
		this.thirdTree = thirdTree;
	}
	
	
}
